<?php

class cAction
{
	private $sAction;
	private $oAction;

	public function __construct($sAction)
	{
		$sAction = trim(strip_tags($sAction));
		$this->sAction = $sAction;

		if(!$this->sAction)
                {
			$this->sAction = STORK_DEFAULT_ACTION;
		}

		$sAction = $this->sAction;

		if($sAction)
		{
			$this->oAction = new $sAction();
			$this->oAction->getAction();
		}
		else
		{
			throw new cException($sAction, STORK_ACTION_NOT_FOUND, STORK_STATE_ERROR);
		}
	}
}
